package com.gitee.zhanyao.monomer.config;

import io.swagger.v3.oas.models.OpenAPI;
import io.swagger.v3.oas.models.info.Info;
import io.swagger.v3.oas.models.info.License;
import org.springframework.context.annotation.Bean;
import org.springframework.stereotype.Component;

@Component
public class OpenApiConfig {

    /**
     * OpenAPI 文档说明
     *
     * @return OpenAPI
     */
    @Bean
    public OpenAPI openAPI() {
        return new OpenAPI()
                .info(new Info().title("Monomer 接口文档")
                        .description("单体应用样例程序")
                        .version("v0.0.1")
                        .license(new License().name("Apache 2.0").url("https://gitee.com/zhanyao/monomer")));
    }

}
